<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>10-z-index</title>
    <style>
        .box {
            width: 300px;
            height: 300px;
            background-color: #f00;
            position: relative;
        }

        .child1 {
            width: 100px;
            height: 100px;
            background-color: #0f0;
            position: absolute;
            z-index: 11;
        }

        .child2 {
            width: 100px;
            height: 100px;
            background-color: #00f;
            position: absolute;
            top: 50px;
            left: 50px;
            z-index: 10;
        }
</style>
</head>
<body>

<div class="box">
    <div class="child1"></div>
    <div class="child2"></div>
</div>

</body>
</html>